package cn.mado.org.mapper;


import cn.mado.org.domain.Writer;
import cn.mado.org.query.WriterQuery;

import java.util.List;

public interface WriterMapper {

    //删除
    //@Delete("delete from t_writer where writer_id = #{writer_id}")
    void deleteWriterById(Long writerId);
    //新增
    //@Insert("insert into t_writer(writerName,creator) values(#{writerName}, #{creator})")
    void addWriter(Writer writer);
    //修改
   // @Update("update t_writer set  writerName = #{writerName} ,creator=#{creator} where writer_id = #{writer_id}")
    void updateWriter(Writer writer);
    //查询
   // @Select("select * from t_writer")
    List<Writer> findAll();
    //单条查询
    //@Select("select * from t_writer where writer_id = #{writer_id}")
    Writer findWriterById(Long writerId);
    //查询所有的count
    Integer queryByCount(WriterQuery writerQuery);
    //分页查询
    List<Writer> queryByPage(WriterQuery writerQuery);

}
